//@ sourceURL=/static/modules/<%=viewPath%>/<%=name%>.js
var <%=name %>View = new View({
    name: '<%=name%>',
    init_page() {
        console.log('<%=name%>-load');
    }
});
/**
 * 方法
 */
<%=name %>View.fn = {
    delete (e) {
        swal($.po('sweetalert', {
            title: "确定要删除该员工吗？",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: '#DD6B55',
            confirmButtonText: '删除',
            cancelButtonText: "取消",
            closeOnConfirm: false,
        }), function (isConfirm) {
            if (isConfirm) {
                alertify.success('删除成功!')
                swal.close();
            }
        });
    },
    render: {
        operation(data, type) {
            var html = '<button class="btn btn-primary margin-right-10 grid-delete-btn" data-name="' + data.name + '" data-id="' + data.userId + '" type="button" onClick="<%=name%>View.fn.delete(this)" >删除</button>'
            return html;
        }
    }
}
/**
 * 事件
 */
<%=name %>View._event = () => {

}

/**
 * 绑定插件
 */
<%=name %>View.use(new Table({
    selector: '#<%=name %>_list',
    url: '/user/users',
    search_btn: "#search_btn",
    callback: function () {

    }
}))